package com.eunion.core.common.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.Size;

import com.eunion.core.common.domain.enumeration.RecordEnableFlag;
import com.eunion.core.common.domain.enumeration.UploadDepartment;

@MappedSuperclass
public class AbstractExcelReport extends AbstractOracleIdxObject {

    private static final long serialVersionUID = 1L;

    @ManyToOne
    @JoinColumn(name = "fk_upload_id")
    private ExcelUploadRecord uploadRecord;

    /**
     * 入库时间
     */
    @Column(name = "rksj")
    private Date storeTime = new Date();

    /**
     * 是否有效，0有效，1逻辑删除
     */
    @Column(name = "enable")
    @Enumerated
    private RecordEnableFlag enable = RecordEnableFlag.ENABLE;

    /**
     * 操作人ID
     */
    @Size(max = 32)
    @Column(name = "opuser_id", length = 32)
    private String userId;

    /**
     * 操作人姓名
     */
    @Size(max = 32)
    @Column(name = "opuser_name", length = 32)
    private String userName;

    /**
     * 上传单位：1电力运管中心，2内燃运管中心 另外匹配 上传单位，1机车分公司，2联合单位 ( 生产部 机车改造计划表 解析)
     */
    @Column(name = "upload_dw")
    @Enumerated
    private UploadDepartment uploadDepartment;

    public ExcelUploadRecord getUploadRecord() {
        return uploadRecord;
    }

    public void setUploadRecord(ExcelUploadRecord uploadRecord) {
        this.uploadRecord = uploadRecord;
    }

    public Date getStoreTime() {
        return storeTime;
    }

    public void setStoreTime(Date storeTime) {
        this.storeTime = storeTime;
    }

    public RecordEnableFlag getEnable() {
        return enable;
    }

    public void setEnable(RecordEnableFlag enable) {
        this.enable = enable;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public UploadDepartment getUploadDepartment() {
        return uploadDepartment;
    }

    public void setUploadDepartment(UploadDepartment uploadDepartment) {
        this.uploadDepartment = uploadDepartment;
    }

}
